From: Felix Fietkau Date: Mon, 12 Oct 2015 13:11:20 +0000 (+0000) Subject: firmware-utils/buffalo-enc: explicitly use signed char for checksum function X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=b2ef161b482d556c2d52fcc1e7412122f67973bd;p=project%2Ffirmware-utils.git firmware-utils/buffalo-enc: explicitly use signed char for checksum function ARM defaults to unsigned char and that breaks the calculation, as it relies on sign extension Signed-off-by: Felix Fietkau SVN-Revision: 47186 --- diff --git a/src/buffalo-lib.c b/src/buffalo-lib.c index add3a7e..b1d5ede 100644 --- a/src/buffalo-lib.c +++ b/src/buffalo-lib.c @@ -179,7 +179,7 @@ int bcrypt_buf(unsigned char seed, unsigned char *key, unsigned char *src, uint32_t buffalo_csum(uint32_t csum, void *buf, unsigned long len) { - char *p = buf; + signed char *p = buf; while (len--) { int i;